package com.sybil.spa.dominio.r12;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Entity
@Table(name = "XXLO_REEMB_PROVEEDORES_V")
public class Proveedor implements Serializable {

   private Integer numero;
   private String rfc;
   private String razonSocial;

   public Proveedor() {
   }

   public Proveedor(Integer numero) {
      this.numero = numero;
   }

   @Id
   @Basic(optional = false)
   @NotNull
   @Column(name = "ID_PROV")
   public Integer getNumero() {
      return numero;
   }

   @Basic(optional = false)
   @NotNull
   @Size(min = 1, max = 20)
   @Column(name = "RFC")
   public String getRfc() {
      return rfc;
   }

   @Basic(optional = false)
   @NotNull
   @Size(min = 1, max = 100)
   @Column(name = "NOM_PROV")
   public String getRazonSocial() {
      return razonSocial;
   }

   public void setRfc(String rfc) {
      this.rfc = rfc;
   }

   public void setNumero(Integer numero) {
      this.numero = numero;
   }

   public void setRazonSocial(String razonSocial) {
      this.razonSocial = razonSocial;
   }

   @Override
   public int hashCode() {
      int hash = 0;
      hash += (numero != null ? numero.hashCode() : 0);
      return hash;
   }

   @Override
   public boolean equals(Object object) {
      if (!(object instanceof Proveedor)) {
         return false;
      }
      Proveedor other = (Proveedor) object;
      if ((this.numero == null && other.numero != null) || (this.numero != null && !this.numero.equals(other.numero))) {
         return false;
      }
      return true;
   }

   @Override
   public String toString() {
      return "Proveedor[ numero=" + numero + " ]";
   }
}
